/* ==SillyTavern Weibo UI Styles== */
/* @name         Weibo UI Styles for Mobile Extension */
/* @version      1.0.0 */
/* @description  微博应用的UI样式，实现响应式设计和真实微博风格 */
/* @author       Assistant */

/* ===== 微博应用基础样式 ===== */
.weibo-app {
  position: relative; /* 添加相对定位，让tabs能相对于此容器定位 */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f7f7f7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    sans-serif;
  overflow: hidden;
}

/* ===== 微博头部样式 ===== */
.weibo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, #ff8500, #ff9500);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 133, 0, 0.3);
  min-height: 44px;
  flex-shrink: 0;
}

.weibo-header .header-left {
  display: flex;
  align-items: center;
}

.weibo-header .app-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.weibo-header .header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weibo-header .app-header-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.weibo-header .app-header-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.weibo-header .app-header-btn:active {
  transform: translateY(0);
}

.weibo-header .app-header-btn i {
  font-size: 12px;
}

/* 响应式头部按钮 */
@media (max-width: 360px) {
  .weibo-header .app-header-btn {
    padding: 5px 8px;
    font-size: 12px;
    gap: 3px;
  }

  .weibo-header .app-header-btn span {
    display: none;
  }

  .weibo-header .app-header-btn i {
    font-size: 14px;
  }
}

/* ===== 页面切换栏样式 ===== */
.weibo-tabs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  background: white;
  border-top: 1px solid #e8e8e8; /* 改为顶部边框 */
  border-bottom: none; /* 移除底部边框 */
  flex-shrink: 0;
  height: 32px; /* 恢复原来的高度 */
  z-index: 1000; /* 确保在最上层 */
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
  padding-bottom: env(safe-area-inset-bottom, 0); /* 适配iPhone底部安全区域 */
  align-items: center; /* 垂直居中对齐 */
}

.weibo-tabs .tab-item {
  flex: 1;
  display: flex;
  flex-direction: row; /* 改为水平排列 */
  align-items: center;
  justify-content: center;
  padding: 2px 4px; /* 恢复原来的内边距 */
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  color: #666;
  font-size: 12px; /* 恢复原来的字体大小 */
  gap: 3px; /* 恢复原来的图标和文字间距 */
}

.weibo-tabs .tab-item:hover {
  background: #f5f5f5;
  color: #ff8500;
}

.weibo-tabs .tab-item.active {
  color: #ff8500;
  background: #fff;
}

.weibo-tabs .tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px; /* 缩小指示器宽度 */
  height: 2px; /* 缩小指示器高度 */
  background: #ff8500;
  border-radius: 1px;
}

.weibo-tabs .tab-item i {
  font-size: 12px; /* 恢复原来的图标大小 */
  margin-bottom: 0; /* 移除下边距 */
}

.weibo-tabs .tab-item span {
  font-size: 11px; /* 恢复原来的文字大小 */
  font-weight: 500;
}

/* 响应式标签栏 */
@media (max-width: 320px) {
  .weibo-tabs .tab-item {
    padding: 1px 3px; /* 进一步缩小 */
  }

  .weibo-tabs .tab-item i {
    font-size: 8px; /* 进一步缩小图标 */
    margin-bottom: 0;
  }

  .weibo-tabs .tab-item span {
    font-size: 7px; /* 进一步缩小文字 */
  }
}

/* 中等屏幕响应式 */
@media (max-width: 480px) and (min-width: 321px) {
  .weibo-content {
    padding-bottom: 42px; /* 适应原始tabs高度 */
  }
}

/* 处理iPhone等设备的安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .weibo-tabs {
    padding-bottom: calc(env(safe-area-inset-bottom) + 5px);
  }

  .weibo-content {
    padding-bottom: calc(42px + env(safe-area-inset-bottom));
  }
}

/* ===== 微博内容区域样式 ===== */
.weibo-content {
  flex: 1;
  overflow-y: auto;
  background: #f7f7f7;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 42px; /* 为底部tabs留出空间 (32px + 10px margin) */
}

/* ===== 微博页面通用样式 ===== */
.weibo-page {
  min-height: 100%;
  padding-bottom: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  background: white;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.section-header i {
  color: #ff8500;
  font-size: 16px;
}

/* ===== 热搜列表样式 ===== */
.hot-search-section {
  background: white;
  margin-bottom: 8px;
}

.hot-search-list {
  padding: 0 16px 12px;
}

.hot-search-item {
  display: flex;
  align-items: center;
  padding: 6px 0; /* 缩小间距 */
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hot-search-item:hover {
  background: #f9f9f9;
}

.hot-search-item:last-child {
  border-bottom: none;
}

.hot-search-item .search-rank {
  width: 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #ff8500;
  margin-right: 12px;
}

.hot-search-item .search-content {
  flex: 1;
  min-width: 0;
}

.hot-search-item .search-title {
  font-size: 13px; /* 缩小字体 */
  color: #333;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-search-item .search-heat {
  font-size: 10px; /* 缩小字体 */
  color: #999;
}

.hot-search-item .search-icon {
  margin-left: 8px;
  font-size: 14px;
}

/* ===== 榜单样式 ===== */
.ranking-section {
  background: white;
  margin-bottom: 8px;
}

.ranking-container {
  margin-bottom: 16px;
}

.ranking-container:last-child {
  margin-bottom: 0;
}

.ranking-list {
  padding: 0 16px 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 5px 0; /* 缩小间距 */
  border-bottom: 1px solid #f5f5f5;
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-item.top-rank .item-rank {
  background: linear-gradient(135deg, #ff8500, #ff9500);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.ranking-item .item-rank {
  width: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-right: 12px;
}

.ranking-item .item-content {
  flex: 1;
  min-width: 0;
}

.ranking-item .item-name {
  font-size: 13px; /* 缩小字体 */
  color: #333;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item .item-heat {
  font-size: 10px; /* 缩小字体 */
  color: #999;
}

/* ===== 博文列表样式 ===== */
.posts-section {
  background: white;
}

.posts-list {
  padding: 0;
}

.weibo-post {
  background: white;
  border-bottom: 8px solid #f7f7f7;
  padding: 12px 16px;
}

.weibo-post:last-child {
  border-bottom: none;
}

/* 博文头部 */
.post-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.author-avatar.small {
  width: 28px;
  height: 28px;
  font-size: 12px;
  flex-shrink: 0; /* 防止头像被压缩 */
  min-width: 28px; /* 确保最小宽度 */
}

.author-avatar.large {
  width: 32px; /* 缩小头像 */
  height: 32px;
  font-size: 14px; /* 缩小字体 */
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.post-time {
  font-size: 12px;
  color: #999;
}

/* 博文内容 */
.post-content {
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 15px;
  color: #333;
  word-wrap: break-word;
}

.post-content .topic-tag {
  color: #ff8500;
  font-weight: 500;
}

.post-content .mention-user {
  color: #1890ff;
  font-weight: 500;
}

/* 博文操作栏 */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 均匀分布三个按键 */
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: 16px;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  justify-content: center;

}

.action-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.action-btn.liked {
  color: #ff8500;
}

.action-btn.liked:hover {
  color: #ff7300;
}

.action-info {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
  font-size: 13px;
}

.action-btn i,
.action-info i {
  font-size: 14px;
}

/* 评论区域 */
.post-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.comments-header {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.comment-item {
  padding: 8px 0;
  border-bottom: 1px solid #f8f8f8;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-author {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: nowrap; /* 防止换行 */
  width: 100%;
}

.comment-info {
  flex: 1;
  min-width: 0;
  overflow: hidden; /* 防止内容溢出 */
}

.comment-author-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap; /* 防止用户名换行 */
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-time {
  font-size: 11px;
  color: #999;
  white-space: nowrap; /* 防止时间换行 */
  flex-shrink: 0; /* 防止时间被压缩 */
}

.comment-content {
  margin-bottom: 6px;
  line-height: 1.4;
  font-size: 14px;
  color: #333;
  word-wrap: break-word;
  word-break: break-word; /* 确保长单词换行 */
  margin-left: 0;
  padding-left: 0;
  width: 100%; /* 确保占满可用宽度 */
  box-sizing: border-box;
}

.comment-content .reply-to {
  color: #1890ff;
  font-weight: 500;
}

.comment-content .topic-tag {
  color: #ff8500;
  font-weight: 500;
}

.comment-content .mention-user {
  color: #1890ff;
  font-weight: 500;
}

.comment-actions {
  display: flex;
  align-items: center;
  justify-content: center; /* 居中对齐 */
  gap: 20px; /* 两个按键之间的间距 */
  margin-top: 8px; /* 上边距 */
  width: 100%; /* 占满可用宽度 */
}

.comment-actions .action-btn {
  padding: 4px 6px;
  font-size: 12px;
  gap: 3px;flex:1;
}

.comment-actions .action-btn i {
  font-size: 12px;
}

/* ===== 微博评论布局强化规则 - 防止格式错乱 ===== */
/* 使用更高的特异性来确保样式不被覆盖 */

/* 重置所有评论项的盒模型 */
.weibo-app .comment-item,
.weibo-app .comment-item * {
  box-sizing: border-box !important;
}

/* 🔥 超高优先级：确保微博评论作者区域始终为水平布局 */
.weibo-app .comment-item .comment-author,
.weibo-app .post-comments .comment-author,
.weibo-app .comments-list .comment-author {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

/* 🔥 超高优先级：确保微博评论信息区域为垂直布局 */
.weibo-app .comment-item .comment-info,
.weibo-app .post-comments .comment-info,
.weibo-app .comments-list .comment-info {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* 🔥 超高优先级：确保用户名和时间为块级元素 */
.weibo-app .comment-author-name,
.weibo-app .comment-time {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 🔥 防止任何子元素破坏布局 */
.weibo-app .comment-author > * {
  flex-shrink: 0 !important;
}

.weibo-app .comment-author .comment-info {
  flex-shrink: 1 !important;
  flex-grow: 1 !important;
}

/* 🔥 确保评论内容和操作按钮正确布局 */
.weibo-app .comment-content {
  display: block !important;
  width: 100% !important;
  margin-bottom: 8px !important;
}

.weibo-app .comment-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  margin-top: 8px !important;
  width: 100% !important;
}

/* 🔥 强制所有屏幕尺寸下的布局稳定性 - 使用更高特异性 */
@media screen and (max-width: 9999px) {
  .weibo-app .comment-item .comment-author,
  .weibo-app .post-comments .comment-author,
  .weibo-app .comments-list .comment-author {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }

  .weibo-app .comment-item .comment-info,
  .weibo-app .post-comments .comment-info,
  .weibo-app .comments-list .comment-info {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* 🔥 额外保护：防止其他CSS框架干扰 */
.weibo-app .comment-item {
  contain: layout style !important;
}

/* 🔥 最终保护：使用CSS层级来确保优先级 */
@layer weibo-comments {
  .weibo-app .comment-author {
    display: flex !important;
    flex-direction: row !important;
  }

  .weibo-app .comment-info {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* 回复输入框 */
.reply-input-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.reply-input {
  background: #ffffff !important; /* 强制白色背景，不跟随主题 */
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reply-input textarea {
  width: 100%;
  min-height: 60px;
  border: none;
  background: #ffffff !important; /* 强制白色背景 */
  resize: none;
  font-size: 14px;
  color: #333333 !important; /* 强制黑色文字 */
  outline: none;
  font-family: inherit;
}

.reply-input textarea::placeholder {
  color: #666666 !important; /* 深灰色提示文字 */
}

.reply-input textarea:focus {
  border: 1px solid #1890ff !important;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
}

.reply-input:focus-within {
  border-color: #1890ff !important;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15) !important;
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.reply-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-reply-btn {
  background: #f5f5f5;
  color: #666;
}

.cancel-reply-btn:hover {
  background: #e8e8e8;
}

.send-reply-btn {
  background: #ff6b6b;
  color: white;
}

.send-reply-btn:hover {
  background: #ff5252;
}

/* 回复通知样式 */
.reply-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reply-notification.show {
  transform: translateX(0);
}

.reply-notification.success {
  background: #52c41a;
}

.reply-notification.error {
  background: #ff4d4f;
}

.reply-notification.loading {
  background: #1890ff;
}

.reply-notification i {
  margin-right: 8px;
}

/* 移动端通知样式调整 */
@media (max-width: 768px) {
  .reply-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    transform: translateY(-100%);
  }

  .reply-notification.show {
    transform: translateY(0);
  }
}

/* ===== 用户页面样式 ===== */
.user-info-section {
  background: white;
  margin-bottom: 8px;
}

.user-header {
  display: flex;
  align-items: center;
  gap: 4px; /* 进一步缩小间距 */
  padding: 4px; /* 进一步缩小padding */
  border-bottom: 1px solid #f0f0f0;
}

.user-avatar-large {
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.profile-name {
  font-size: 18px; /* 增加字体大小 */
  font-weight: bold; /* 设为粗体 */
  color: #333;
  line-height: 1.2;
}

.edit-name-btn {
  padding: 2px; /* 缩小padding */
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  border-radius: 2px; /* 缩小圆角 */
  transition: all 0.2s ease;
  font-size: 8px; /* 缩小图标大小 */
}

.edit-name-btn:hover {
  background: #f5f5f5;
  color: #666;
}

.account-type {
  font-size: 9px; /* 大幅缩小字体 */
  color: #666;
  background: #f0f0f0;
  padding: 1px 4px; /* 缩小padding */
  border-radius: 6px; /* 缩小圆角 */
  display: inline-block;
  line-height: 1.1; /* 紧凑行高 */
}

.user-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* 保持三列布局 */
  gap: 4px; /* 缩小间距 */
  padding: 3px; /* 进一步缩小padding */
}

.stat-item {
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 2px; /* 进一步缩小padding */
  border-radius: 2px; /* 进一步缩小圆角 */
}

.stat-item:hover {
  background: #f8f8f8;
}

.stat-number {
  font-size: 11px; /* 大幅缩小字体 */
  font-weight: 500; /* 减轻字重 */
  color: #333;
  margin-bottom: 1px; /* 缩小间距 */
  line-height: 1.1; /* 紧凑行高 */
}

.stat-label {
  font-size: 8px; /* 大幅缩小字体 */
  color: #666;
  line-height: 1.1; /* 紧凑行高 */
}

/* ===== 状态样式 ===== */
.loading-state,
.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #666;
}

.loading-state i,
.empty-state i,
.error-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ccc;
}

.loading-state i {
  color: #ff8500;
}

.error-state i {
  color: #ff4757;
}

.loading-state h3,
.empty-state h3,
.error-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #333;
}

.loading-state p,
.empty-state p,
.error-state p {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.retry-btn {
  padding: 8px 16px;
  background: #ff8500;
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.retry-btn:hover {
  background: #ff7300;
}

.empty-posts {
  padding: 40px 20px;
  text-align: center;
  color: #666;
}

.empty-posts i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 16px;
}

.empty-posts p {
  font-size: 14px;
  margin-bottom: 8px;
}

/* ===== 头像颜色变量 ===== */
:root {
  --avatar-gradient-1: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  --avatar-color-1: #b28cb9;
  --avatar-color-2: #e2b3d4;
  --avatar-color-3: #f7d1e6;
  --avatar-color-4: #d49ec2;
  --avatar-color-5: #f3c6d7;
  --avatar-color-6: #ec97b7;
  --avatar-color-7: #d66a88;
  --avatar-color-8: #b74d66;
  --avatar-color-9: #e3d6a7;
  --avatar-color-10: #c8ac6d;
  --avatar-color-11: #a0d8e1;
  --avatar-color-12: #2e8b9b;
  --avatar-color-13: #1a6369;
  --avatar-color-14: #0e3d45;
  --avatar-color-15: #6ba1e1;
  --avatar-color-16: #1f5e8d;
  --avatar-color-17: #b7d3a8;
  --avatar-color-18: #3e7b41;
  --avatar-color-19: #f9e79f;
  --avatar-color-20: #a3b4e2;
}

/* ===== 响应式设计 ===== */
@media (max-width: 480px) {
  .weibo-post {
    padding: 10px 12px;
  }

  .post-header {
    margin-bottom: 6px;
  }

  .author-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .author-avatar.small {
    width: 24px;
    height: 24px;
    font-size: 10px;
    flex-shrink: 0; /* 防止头像被压缩 */
    min-width: 24px; /* 确保最小宽度 */
  }

  .author-name {
    font-size: 14px;
  }

  .post-content {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .post-actions {
    justify-content: space-between; /* 保持均匀分布 */
  }

  .action-btn {
    padding: 5px 6px;
    font-size: 12px;
  }

  .comment-content {
    font-size: 13px;
    margin-left: 0;
    width: 100%; /* 确保占满可用宽度 */
    box-sizing: border-box;
  }

  .comment-actions {
    justify-content: center; /* 保持居中对齐 */
    gap: 16px; /* 响应式下缩小间距 */
  }

  /* 强化评论作者布局 */
  .comment-author {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px; /* 响应式下缩小间距 */
  }

  .user-header {
    padding: 3px; /* 响应式下进一步缩小 */
    gap: 2px;
  }

  .profile-name {
    font-size: 10px; /* 进一步缩小字体 */
  }

  .account-type {
    font-size: 7px; /* 响应式下进一步缩小 */
    padding: 1px 2px;
  }

  .user-stats {
    padding: 2px; /* 响应式下进一步缩小 */
  }

  .stat-number {
    font-size: 10px; /* 响应式下进一步缩小 */
  }

  .stat-label {
    font-size: 7px; /* 响应式下进一步缩小 */
  }
}

@media (max-width: 320px) {
  .weibo-post {
    padding: 8px 10px;
  }

  .author-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .author-avatar.small {
    width: 20px;
    height: 20px;
    font-size: 9px;
    flex-shrink: 0; /* 防止头像被压缩 */
    min-width: 20px; /* 确保最小宽度 */
  }

  .post-content {
    font-size: 13px;
  }

  .action-btn {
    padding: 4px 5px;
    font-size: 11px;
    gap: 2px;
  }

  .comment-content {
    font-size: 12px;
    margin-left: 0;
    width: 100%; /* 确保占满可用宽度 */
    box-sizing: border-box;
  }

  .comment-actions {
    justify-content: center; /* 保持居中对齐 */
    gap: 12px; /* 最小屏幕下进一步缩小间距 */
  }

  /* 强化评论作者布局 - 最小屏幕 */
  .comment-author {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px; /* 最小屏幕下进一步缩小间距 */
  }

  /* 用户头部在小屏幕下的进一步优化 */
  .user-header {
    padding: 2px;
    gap: 1px;
  }

  .profile-name {
    font-size: 9px;
  }

  .account-type {
    font-size: 6px;
    padding: 0px 1px;
  }

  .user-stats {
    padding: 1px;
    gap: 2px;
  }

  .stat-number {
    font-size: 8px;
  }

  .stat-label {
    font-size: 6px;
  }
}

/* 删除按钮样式 */
.delete-btn.weibo-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #9ca3af;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.delete-btn.weibo-delete-btn:hover {
  background: #6b7280;
  transform: scale(1.05);
}

.delete-btn.weibo-delete-btn:active {
  transform: scale(0.95);
}

/* 确保post-header有相对定位以便删除按钮绝对定位 */
.post-header {
  position: relative;
}
